<script setup lang="ts">
import { ref } from 'vue';


const car = ref('pppp')
const logCar = () => {
  console.log(car.value);
  
}

//主动暴露属性和方法
defineExpose({car,logCar})

</script>

<template>
  <div class="child-page">
    子组件
  </div>
</template>

<style lang="css" scoped>
.child-page{
    width: 400px;
    height: 150px;
    background-color: azure;
}

</style>
